JBoss Community Archive (Read Only)

PicketLink

Website using Awestruct

Steps Necessary

  1. Installation of Awestruct

  2. Creation of Project Directory or Clone/Fork Git Repository

Installation Of Awestruct

Reference: http://awestruct.org/getting_started/

Fedora

Install Ruby and RVM
curl -L https://get.rvm.io | bash -s stable --ruby=1.9.3
Ensure you have some dependencies that Nokogiri needs.
sudo yum install libxml2-devel libxslt libxslt-devel
Ensure you have development tools installed.

Install those libraries if you don't have them already installed. This should avoid some errors when using gem, where you get messages telling you that " You need to install the  development tools first. "

sudo yum install gcc gcc-c++

Install Awestruct, Asciidoctor, rake and bundler

gem install awestruct asciidoctor rake bundler

This is important. Check if the installation has been successful.

$ awestruct --version
WARNING: Missing required dependency to activate optional built-in extension coffeescripttransform.rb
  cannot load such file -- coffee-script
WARNING: Missing required dependency to activate optional built-in extension minify.rb
  cannot load such file -- htmlcompressor
Awestruct: 0.5.3
http://awestruct.org/

Looks like awestruct has been installed.

Creation of Project Directory or Fork/Clone GIT Repository

You just have to do mkdir and cd into a new directory.

mkdir awestruct
cd awestruct/

Typically you would use awestruct to create the template for you.

In the case of PicketLink, we have a git workspace for the website.

Assuming you have forked the website workspace, just go to the forked workspace directory.

Work on the Website Files

In the directory where your project files are, you can run awestruct in development mode to create the files.

awestruct -d

Try to update rake

rake update

Now run rake as follows:

rake

Locally, you can test your website at http://localhost:4242

Workspace - clearing out generated files

rake clean 

Development Mode

awestruct -d

This will start the web server and you can test at port 4242

Staging Profile

awestruct -Pstaging

This does not start the web server. The generated files under _site are all with staging profile.

Publish the Site

When you are ready to publish, I follow the steps:

rake clean

awestruct -Pproduction

This will minimize css,js etc and make the files under _site directory ready for the website.

Now I just use scp to upload the files in the _site directory into the production box.

The command I use from the _site directory is the following:

scp -i MY_DOT_RSA_FILE -r . picketlink@FILE_SERVER_NAME:/www_htdocs/picketlink/

If you are using the default xxx.rsa file, then you do not need the -i option in scp.

Remember to get the FILE_SERVER_NAME from one of the PL developers.

References

HAML: http://haml.info/docs/yardoc/file.REFERENCE.html

JBoss.org Template And Other Important Information: http://example.jboss.org/

JBoss.org Content Archive (Read Only), exported from JBoss Community Documentation Editor at 2020-03-11 12:19:46 UTC, last content change 2014-03-19 17:35:44 UTC.